UNIQUE	=	0x01

# *********************************************************************
class DBType(object):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		self.name				=	name
		self.flags			=	flags
		self.default		=	default
		self.validator	=	validator
		self.fieldname	=	fieldname

# *********************************************************************
class PrimaryKey(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, 
			flags | UNIQUE,
			default, 
			validator,
			fieldname,)

# *********************************************************************
class ForeignKey(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			app,
			table,
			idname):
		DBType.__init__(name)
		self.app		=	app
		self.table	=	table
		self.idname	=	idname

# *********************************************************************
class Key(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)
		
# *********************************************************************
class Int(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)

# *********************************************************************
class Float(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)

# *********************************************************************
class Text(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)

# *********************************************************************
class Bool(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)
		
# *********************************************************************
class Decimal(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)

# *********************************************************************
class Byte(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)
		
# *********************************************************************
class Pickle(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)
		
# *********************************************************************
class DateTime(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)

# *********************************************************************
class List(DBType):
	
	# -------------------------------------------------------------------
	def __init__(self, 
			name, 
			flags = None, 
			default = None, 
			validator = None,
			fieldname	=	None):
		DBType.__init__(name, flags, default, validator, fieldname)
